package javase.annotations.processors;

import java.lang.reflect.Method;

import javase.annotations.runtime.MethodRuntime;

public class MethodRuntimeAnnotationProcessor implements AnnotationProcessor {

	@Override
	public void printAnnotationDetails(Class<?> sourceClazz) {
		Method [] methods = sourceClazz.getDeclaredMethods();
		for (Method method : methods) {
			MethodRuntime methodRuntime = method.getAnnotation(MethodRuntime.class);
			if (methodRuntime != null) {
				System.out.println("@MethodRuntime(MethodDescription = \"" + methodRuntime.methodDescription() + "\")");
				System.out.println(method.getName());
			}
			System.out.println();
		}
	}
	
}
